/*
package com.nhii.base.common.dialog;

import android.content.Context;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;


import com.jess.arms.callback.EmptyCallback;
import com.jess.arms.callback.ErrorCallback;
import com.jess.arms.callback.LoadSirManagement;
import com.jess.arms.callback.LottieLoadingCallback;
import com.jess.arms.callback.TimeoutCallback;
import com.jess.arms.mvp.IPresenter;
import com.jess.arms.mvp.IView;
import com.kingja.loadsir.callback.Callback;
import com.kingja.loadsir.core.LoadService;
import com.lxj.xpopup.impl.PartShadowPopupView;
import com.nhii.base.common.R;
import com.nhii.base.common.widget.LoadingView;

import javax.inject.Inject;

*/
/**
 * author : Alex
 * e-mail : xys9786@outlook.com
 * date   : 2020/5/411:55
 * desc   : 统一 PartShadowPopupView
 * version: 1.0
 *//*

public abstract class BasePartShadowPopupView<p extends IPresenter> extends PartShadowPopupView implements IView {

    @Inject
    @Nullable
    protected p mPresenter;//如果当前页面逻辑简单, Presenter 可以为 null
    private LoadingView loadingView;
    private final Context context1;
    public LoadService mBaseLoadService;

    public BasePartShadowPopupView(@NonNull Context context) {
        super(context);
        context1 = context;
    }

    */
/**
     * 初始化 LoadSir
     *//*

    public void initLoadSir(View view) {
        if (mBaseLoadService ==null){
            mBaseLoadService = LoadSirManagement.initPopLoadSir().register(view,(Callback.OnReloadListener) this::onNetReload);
        }
    }

    protected abstract void onNetReload(View v);

    // 隐藏
    public void closeLoadingDialog() {
        if (loadingView != null)
            loadingView.dismiss();
    }

    //显示
    public void showLoadingDialog() {
        if (loadingView == null)
            loadingView = new LoadingView(context1, R.style.CustomDialog);
        loadingView.show();

    }


    @Override
    public void showLoading() {
        showLoadingDialog();
    }

    @Override
    public void hideLoading() {
        closeLoadingDialog();
    }

    */
/**
     * 加载布局
     *//*

    @Override
    public void showLoadingLayout() {
        if (mBaseLoadService!=null){
            mBaseLoadService.showCallback(LottieLoadingCallback.class);
        }

    }

    */
/**
     * 显示空白页面
     *//*

    @Override
    public void showEmpty() {
        if (mBaseLoadService!=null)
        mBaseLoadService.showCallback(EmptyCallback.class);
    }

    */
/**
     * 显示内容
     *//*

    @Override
    public void showContent() {
        if (mBaseLoadService!=null){
            mBaseLoadService.showSuccess();
        }
    }

    */
/**
     * 显示加载失败
     *//*

    @Override
    public void showFailure() {
        if (mBaseLoadService!=null){
            mBaseLoadService.showCallback(ErrorCallback.class);
        }

    }

    */
/**
     * 显示无网络
     *//*

    @Override
    public void showNoNetwork() {
        if (mBaseLoadService!=null){
            mBaseLoadService.showCallback(TimeoutCallback.class);
        }
    }

    */
/**
     * 加载超时
     *//*

    @Override
    public void showTimeOut() {
        if (mBaseLoadService!=null){
            mBaseLoadService.showCallback(TimeoutCallback.class);
        }
    }

    @Override
    public void showMessage(@NonNull String message) {

    }

*/
/*
        CancelOrOkDialog cancelOrOkDialog = new CancelOrOkDialog(getContext(), "是否要提交？") {
            @Override
            public void ok() {
                super.ok();
                dismiss();
            }
        };
        cancelOrOkDialog.show();*//*



}
*/
